/*    */ package com.zimbra.cs.service.admin;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.common.soap.AdminConstants;
/*    */ import com.zimbra.common.soap.Element;
/*    */ import com.zimbra.cs.account.accesscontrol.AdminRight;
/*    */ import com.zimbra.cs.account.accesscontrol.Rights.Admin;
/*    */ import com.zimbra.cs.fb.ExchangeEWSFreeBusyProvider;
/*    */ import com.zimbra.cs.fb.FreeBusyProvider;
/*    */ import com.zimbra.soap.ZimbraSoapContext;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class GetAllFreeBusyProviders
/*    */   extends AdminDocumentHandler
/*    */ {
/*    */   public Element handle(Element request, Map<String, Object> context)
/*    */     throws ServiceException
/*    */   {
/* 34 */     ZimbraSoapContext zsc = getZimbraSoapContext(context);
/*    */     
/*    */ 
/* 37 */     checkRight(zsc, context, null, Rights.Admin.R_getAllFreeBusyProviders);
/*    */     
/* 39 */     Element response = zsc.createElement(AdminConstants.GET_ALL_FREE_BUSY_PROVIDERS_RESPONSE);
/*    */     
/* 41 */     for (FreeBusyProvider prov : FreeBusyProvider.getProviders()) {
/* 42 */       if (!(prov instanceof ExchangeEWSFreeBusyProvider)) {
/* 43 */         Element provElem = response.addElement("provider");
/* 44 */         provElem.addAttribute("name", prov.getName());
/* 45 */         provElem.addAttribute("propagate", prov.registerForMailboxChanges());
/* 46 */         provElem.addAttribute("start", prov.cachedFreeBusyStartTime());
/* 47 */         provElem.addAttribute("end", prov.cachedFreeBusyEndTime());
/* 48 */         provElem.addAttribute("queue", prov.getQueueFilename());
/* 49 */         provElem.addAttribute("prefix", prov.foreignPrincipalPrefix());
/*    */       }
/*    */     }
/* 52 */     return response;
/*    */   }
/*    */   
/*    */   public void docRights(List<AdminRight> relatedRights, List<String> notes)
/*    */   {
/* 57 */     relatedRights.add(Rights.Admin.R_getAllFreeBusyProviders);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/service/admin/GetAllFreeBusyProviders.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */